package cn.smxy.ln.service;

import cn.smxy.ln.common.lang.Result;
import cn.smxy.ln.pojo.Work;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/*
 * @author ln
 * @date 2022-05-20 19:26
 *
 */
@FeignClient(value = "TPA-SPRINGCLOUD-PROVIDER-WORKREGISTER-8010", contextId = "WorkService", fallbackFactory = WorkServiceFallbackFactory.class)
public interface WorkService {

    @GetMapping("/work/list")
    public Result queryByProjectId(@RequestParam(value = "content", required = false) String content, @RequestParam(value = "scoreRule", required = false) String scoreRule, @RequestParam(value = "projectId", required = false) Long projectId);

    @PostMapping("/work/save")
    public Result save(@RequestBody Work work);

    @PostMapping("/work/delete")
    public Result delete(@RequestParam(value = "id") Long id);

    @PostMapping("/work/update")
    public Result update(@RequestBody Work work);
}
